home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / lib / xmalloc.c < prev    next >
C/C++ Source or Header  |  1992-07-24  |  406b  |  26 lines

  1. /*  $Revision: 1.6 $
  2. **
  3. */
  4. #include <stdio.h>
  5. #include <errno.h>
  6. #include <sys/types.h>
  7. #include "configdata.h"
  8. #include "libinn.h"
  9. #include "clibrary.h"
  10. #include "macros.h"
  11.  
  12.  
  13. /*
  14. **  Allocate some memory or call the memory failure handler.
  15. */
  16. ALIGNPTR
  17. xmalloc(i)
  18.     unsigned int    i;
  19. {
  20.     POINTER        new;
  21.  
  22.     while ((new = malloc(i)) == NULL)
  23.     (*xmemfailure)("malloc", i);
  24.     return CAST(ALIGNPTR, new);
  25. }
  26.